<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <link rel="stylesheet" href="./lib/mui/css/mui.css" />
    <link rel="stylesheet" href="./lib/fa/css/font-awesome.css" />
    <link rel="stylesheet" href="./css/common.css" />
    <link rel="stylesheet" href="./css/search.css" />
  </head>
  <body>
    <div class="lt-layout">
      <!-- 头部 -->
      <div class="lt-head">
        <a href="#" class="lt-home"><i class="mui-icon mui-icon-home"></i></a>
        <div class="lt-title">乐淘云购</div>
        <a href="#" class="lt-search"
          ><i class="mui-icon mui-icon-search"></i
        ></a>
      </div>

      <!-- 主体 -->
      <div class="lt-main">
        <div class="mui-scroll-wrapper">
          <div class="mui-scroll">
            <!--这里放置真实显示的DOM内容-->
            <!-- 头部搜索 -->
            <div class="search-head">
              <input
                type="text"
                placeholder="请输入搜索内容"
                class="search-txt"
              />
              <button class="search-btn mui-btn-primary ">搜索</button>
            </div>

            <!-- 搜索主体 -->
            <div class="search-main">
              <!-- <p>没有更多记录了</p> -->
              <div class="option mui-clearfix">
                <a href="#" class="mui-pull-left">搜索记录</a>
                <a href="#" class="mui-pull-right  history-clear"
                  ><i class="fa fa-trash history-list"></i>清空记录</a
                >
              </div>

              <!-- 历史记录 -->
              <ul class="history-list">
                <li class="mui-clearfix">
                  <a href="#" class="mui-pull-left">运动鞋</a>
                  <span class="mui-pull-right  history-del">×</span>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>

      <!-- 底部 -->
      <div class="lt-footer">
        <ul>
          <li class="current">
            <a href="#"
              ><i class="fa fa-home"></i>
              <p>首页</p></a
            >
          </li>
          <li>
            <a href="#"
              ><i class="fa fa-navicon"></i>
              <p>分类页</p></a
            >
          </li>
          <li>
            <a href="#"
              ><i class="fa fa-cart-arrow-down"></i>
              <p>购物车</p></a
            >
          </li>
          <li>
            <a href="#"
              ><i class="fa fa-user"></i>
              <p>用户中心</p></a
            >
          </li>
        </ul>
      </div>
    </div>
    <!-- 模板 -->
    <script type="text/html" id="tmp">
      {{ if list.length == 0   }}
        <p>没有更多记录了</p>
        {{else}}
      <div class="option mui-clearfix">
        <a href="#" class="mui-pull-left">搜索记录</a>
        <a href="#" class="mui-pull-right  history-clear"
          ><i class="fa fa-trash history-list"></i>清空记录</a
        >
      </div>
      <ul class="history-list">
        {{each list v i}}
        <li class="mui-clearfix">
          <a href="./searchList.html?key={{ v }}" class="mui-pull-left">{{v}}</a>
          <!-- 这里的data-index里面得空格 -->
          <span class="mui-pull-right  history-del" data-index="{{ i }}">×</span>
        </li>
        {{/each}}
      </ul>
      {{/if}}
    </script>

    <script src="./lib/zepto/zepto.min.js"></script>
    <script src="./lib/mui/js/mui.js"></script>
    <script src="./lib/artTemplate/template-web.js"></script>
    <script src="./js/common.js"></script>
    <script src="./js/search.js"></script>
  </body>
</html>
